<!DOCTYPE html>
<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title></title>
    <link href="/styles/goods-detail.css" rel="stylesheet" type="text/css">
    <link href="/styles/base.css" rel="stylesheet" type="text/css">
    <link href="/styles/gonglve.css" rel="stylesheet" type="text/css">
    <link href="/styles/replyDetail.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="/js/jquery/jquery.js"></script>
    <script type="text/javascript" src="/js/plugins/jquery-form/jquery.form.js"></script>
    <link href="/js/plugins/jqPaginator/jqPagination.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="/js/plugins/jqPaginator/jq-paginator.min.js"></script>
    <script type="text/javascript" src="/js/system/gonglve.js"></script>
    <script type="text/javascript" src="/js/system/common.js"></script>
<style>
    .pop-reviews {
        width: 850px;
        top: 5%;
        margin: 0 0 0 -465px;
        padding: 35px 40px 40px;
        background-color: #fff;
    }
</style>
    <script>
$(function () {


        //支付
        $("#pay").click(function () {
            var sid = $(this).data("add");
            var pay = $(this).data("pay");
            $.get("/shop/pay", {sid: sid,pay:pay}, function (data) {
                console.log(data);

                if (data.success) {
             alert("兑换成功"); //
                }  else {
                       alert(data.msg)
                    }
            });
        })



    /*模态框评论*/
    $("#comment").click(function () {
        $.get("/travel/isLogin",function(data){
            if(data.success){
                $("#searchForm").submit();
                //评论
                // $("#searchForm").ajaxForm(function (data) {
                //     $("#strategyComment").html(data);

                $("._j_layer").css("display", "block")

                //  });

            }else{
                alert("滚去登录,没登录写啥游记...")
                // alertTips("温馨提示","请输入密码");
            }
        })



    })

    $(".add-place").click(function () {
        $("#coverBtn").click();
    })

    var all_url ='';

    $("#coverBtn").change(function () {
        if(this.value){
            $('#coverForm').ajaxSubmit(function (data) {
                var img_url = "/"+data
                var dd = "<dd class=\"_j_picitem\"> <div class=\"place\"><div class=\"img\"><img class=\"_j_edit_src\" src="+img_url+" style=\"width: 120px; height: 120px;\" title=\"\"></div><div class=\"title\"><h4 class=\"_j_edit_title\"></h4></div><div class=\"mask-operate\"><a class=\"btn-remove _j_remove_dd\"></a></div></div></dd>"
                $("._j_piclist").prepend(dd);
                all_url = all_url +","+ img_url;
                $("#picUrl").val(all_url);
            })
        }
    })

    $("#btn_save").click(function () {
        $("#saveForm").ajaxSubmit(function (data) {
            if(data){
                console.log(1);
                // //修改评论数
                // $(".replay_num").html(data.data);
                //
                // $("#currentPage").val(1);
                $("._j_layer").css("display", "none") //隐藏模态框
                $("#searchForm").submit();  //重新查一次
            }else {
                popup("点评失败!")
            }
        })
    })





    //显示评论
    $("#searchForm").ajaxForm(function (data) {
        $(".list").html(data);
    });
    $("#searchForm").submit();





})
    </script>


</head>
<body>
<!-- 轮播top菜单导航引入 -->
<#--<jsp:include page="/WEB-INF/views/modules/common/site_header.jsp" />-->
<!-- 轮播top菜单导航引入 -->
 <#assign currentNav="detail">
    <#include "../common/shopNavbar.ftl">


  <!--     分类导航栏 begin       -->

  <!--     分类导航栏 end       -->

  <!-- 商品详情 begin -->
<div class="center-block">
  <div class="goods-detail">
    <!-- 商品简介begin-->
    <div class="goods-detail-info  clearfix J_goodsDetail">
      <div class="container-fluid">
        <div class="row">
          <div class="span13  J_mi_goodsPic_block goods-detail-left-info">
            <div class="goods-pic-box" id="J_mi_goodsPicBox">
              <div class="goods-big-pic J_bigPicBlock"> <img src=${shop.coverUrl}></div>
              <div class="goods-pic-loading">
                <div class="loader loader-gray"></div>
              </div>
              <div class="goods-small-pic clearfix">
                <ul id="goodsPicList">
                  <#if shop??>
                  <#--<#if productImages??>-->
                    <#--<#list  productImages as p>-->
                    <li> <img src=${shop.coverUrl} title=${shop.title}> </li>
                    <#--</#list>-->
                  </#if>
                </ul>
              </div>
            </div>
          </div>
          <div class="span7 goods-info-rightbox">
            <div class="goods-info-leftborder"></div>
            <dl class="goods-info-box ">
              <dt class="goods-info-head">
                <dl id="J_goodsInfoBlock">
                  <dt id="goodsName" class="goods-name"> ${shop.title} </dt>
                  <dd class="goods-subtitle">
                    <p> ${shop.info} </p>
                  </dd>
                  <dd class="goods-info-head-tip">
                    <ul>
                      <#if shop??>
                        <li class="others"><i>${shop.info}</i> </li>
                     </#if>
                    </ul>
                  </dd>
                  <dd class="goods-info-head-price clearfix"> <b class="J_mi_goodsPrice sys_item_price">${shop.integral!}</b> <i>&nbsp;密币</i> <span> 赠送积分:<span class="J_mi_marketPrice sys_item_score">${shop.price}</span> </span><span class="nav-wealth">我的蜂蜜：${(userInfo.userMoney.integral)!}<b id="_j_exchange_honey"></b> </dd>

                    <div class="btn-group btn-group-justified" role="group" aria-label="...">
                        <div class="btn-group" role="group">
                            <button type="button" class="btn btn-default" id="pay" data-pay="${shop.integral}" data-add="${shop.id}">点击购买</button>
                        </div>
                        <div class="btn-group" role="group">
                            <button type="button" class="btn btn-default" id="comment">我要点评</button>
                        </div>

                    </div>



                  </dd>
                    <!-- 商品详情介绍 begin -->
                    <div class="goods-detail-desc J_itemBox" id="goodsDesc" style="display: block;">
                        <div class="container">
                            <div class="shape-container">
                                <p class="detailBlock"> ${shop.shopContent.content} </p>
                            </div>
                        </div>
                    </div>
                </dl>
              </dt>
            </dl>
          </div>
        </div>
      </div>
    </div>


    </div>
    <!-- 商品详情导航栏 begin -->


    <!-- 商品详情介绍 begin  -->

    <!-- 商品详情参数 begin -->
    <div class="goods-detail-nav-name-block J_itemBox" id="goodsParam">
      <div class="container-fluid main-block">
        <div class="border-line"></div>
        <h2 class="nav-name">评价</h2>




          <!--评论-->
          <form id="searchForm" action="/shop/comment" method="post">
              <input type="hidden" name="currentPage" id="currentPage" value="1">
              <input type="hidden" name="detailId" value="${shop.id!}">
        <#--//评论-->
              <div class="_j_commentlist list" id="commentAndReplyPage">
              </div>
              <#--<div class="com-box " id="strategyComment">-->
              <#--</div>-->
          </form>
      </div>
    </div>
    <!--规格-->
    <div class="goods-detail-param  J_itemBox">
      <div class="container-fluid">
        <ul class='param-list'>

                </ul>
              </dd>
            </dl>
          </li>
        </ul>
      </div>
    </div>
    <!-- 商品详情参数 begin -->

    <!-- 商品详情评价晒单 begin -->





    <!-- 商品详情评价晒单 end -->

    <!-- 商品详情商品提问 begin -->

    <!-- 商品详情商品提问 end -->

    <!-- 商品详情售后服务 begin -->
    <div class="goods-detail-nav-name-block " id="goodsService">
      <div class="container-fluid main-block">
        <div class="border-line"></div>
        <h2 class="nav-name">售后服务与退换货流程</h2>
      </div>
    </div>
    <!--售后服务与退换货流程-->
    <div class="goods-detail-service-block">
      <div class="container-fluid">
        <div class="row">
          <div class="span8 service-day-img">  </div>
          <div class="span11 service-detail-block">
            <div class="service-detail-content" id="J_serviceCon">
              <h3 class="title"></h3>
              <h4 class="sub-title"><span class="tit">A</span>phone飞车: </h4>
              <p class="content"> 1）产品自签收后7天内无理由退货，14日内保修<br>
                2）以下情况不能申请售后服务：<br>
                a. 未经授权的修理、改装、改动、碰撞、误用、进水、及不正确的使用所造成的问题。<br>
                b. 商品的外包装、附件、说明书不完整；发票缺失或涂改。<br>
                c. 产品已使用（产品自身质量问题除外）。<br>
                d. 其他不符合售后流程的情况。<br>
                3）产品自身质量问题范围：<br>
                a. 汽车不正常工作且不存在电量低、电池松动或接触点未连好、电池没电、电子部件损坏、开关键处于关的情况。<br>
                b. 电池不能充电且不存在电池连接点接触不好的情况。<br>
                c. 玩用时间短且不存在电池能量低、能量耗尽的情况。<br>
                d. 低速度且不存在电池没电、玩用的地面不平的情况。<br>
                e. wifi链接失败且不存在电量不足、超出遥控范围的情况。<br>
                3）骡窝窝暂不办理自提和退换货业务，现阶段仅提供网上办理及电话办理两种方式<br>
              </p>
              <h4 class="sub-title"><span class="tit">A</span>米兔积木机器人: </h4>
              <p class="content"> 1.产品自签收后7天内无理由退货；7天内质量问题，可以退货、换货；15日内产品质量问题可以换货或者维修；1年内，主控、电机、适配器产品质量问题可以维修，积木件不保。<br>
                2.以下情况不能申请售后服务：<br>
                a. 未经授权的修理、改装、改动、碰撞、误用、进水、及不正确的使用所造成的问题;<br>
                b. 已超过三包有效期；<br>
                c. 因不可抗力造成的损坏；<br>
                d. 不符合《产品性能故障表》所列性能故障的情况；<br>
                e. 因人为原因导致本产品及其配件产生《产品性能故障表》所列性能故障。<br>
                3.积木件超出15天，1年内：自您签收日起12个月内，积木件缺失、损坏可享受一次免费补换件的机会，补换件数量不超过10个。请联系北京爱其科技有限公司服务热线：400-012-6281。<br>
                4.骡窝窝暂不办理自提和退换货业务，现阶段仅提供网上办理及电话办理两种方式。<br>
              </p>
            </div>
          </div>
        </div>
      </div>
    </div>
    <!--售后服务与退换货流程-->
    <!-- 商品详情售后服务 end -->
</div>

</body>
<form action="/uploadImg" method="post" id="coverForm">
    <input type="file" name="pic" id="coverBtn" style="display: none;">
</form>

<div id="_j_layer_0" class="layer _j_layer"
     style="position: fixed; width: 100%; height: 100%; top: 0px; left: 0px; z-index: 1000; display:none">
    <div class="layer_mask _j_mask"
         style="position: fixed; width: 100%; height: 100%; top: 0px; left: 0px; background: rgb(0, 0, 0); opacity: 0.7; z-index: -1;"></div>
    <div class="layer_content _j_content"
         style="position: fixed; width: 100%; height: 100%; top: 0px; left: 0px; z-index: 0; overflow: hidden auto;">
        <div class="popup-box layer_dialog _j_dialog pop_no_margin pop-reviews dialog_overflow"
             style="position: absolute; opacity: 1; background: rgb(255, 255, 255); z-index: 1; left: 218px; top: 20px;">
            <div class="dialog_title" style="display:none">
                <div class="_j_title title"></div>
            </div>
            <div class="dialog_body _j_content">
                <div class="_j_weng_form_cnt">
                    <style type="text/css">
                        .pop-upload-weng {
                            width: 300px;
                        }

                        .pop-upload-weng ._j_piccomment {
                            display: none;
                        }
                    </style>
                    <div class="mfw-reviews">
                        <div id="_j_wengform_cnt_20190823112945_486">
                            <h2>
                                <strong>${shop.title}</strong>
                                <em>*</em>为必填选项
                            </h2>
                        <#--todo-->
                            <form action="/shop/saveComment" method="post" class="_j_commentdialogform" id="saveForm">
                                <input type="hidden" name="picUrl"  id="picUrl">
                                <input type="hidden" name="detailId" value="${shop.id}">
                                <input type="hidden" name="detailTitle" value="${shop.title!}">
                                <input type="hidden" name="type" value="0" id="commentType">
                                <input type="hidden" name="refComment.id" id="refCommentId">
                                <div class="review-item item-star">
                                    <div class="label"><em>*</em>总体评价</div>
                                    <div class="review-star _j_rankblock" data-star="" data-name="rank_star">
                                        <input type="hidden" name="rank_star" value="" essential="1"
                                               data-inputname="总体评价">
                                        <span class="_j_starcount star0"></span>
                                        <div class="click-star _j_starlist">
                                            <a role="button" title="不建议" rel="nofollow"></a>
                                            <a role="button" title="有待改善" rel="nofollow"></a>
                                            <a role="button" title="还可以" rel="nofollow"></a>
                                            <a role="button" title="值得一去" rel="nofollow"></a>
                                            <a role="button" title="强烈推荐" rel="nofollow"></a>
                                        </div>
                                    </div>
                                    <span class="txt-tips _j_startip">点击星星打分</span>
                                </div>

                                <div class="review-group">
                                </div>

                                <div class="review-item item-comment">
                                    <div class="label"><em>*</em>内容</div>
                                    <div class="content">
                                        <textarea class="_j_commentarea" name="content" essential="1"
                                                  data-inputname="内容" placeholder="100字+3图，有机会评为优质点评！" data-minlen="1"
                                                  data-maxlen="10000"></textarea>
                                        <p class="_j_commentcounttip">内容不超过10000字</p>
                                    </div>
                                </div>
                                <div class="review-item item-photo">
                                    <div class="label">上传照片</div>
                                    <div class="content">
                                        <dl class="upload-box _j_piclist">
                                            <dd data-wengid="" class="_j_picitem_btn" id="_j_pluplader_btn_container_1"
                                                style="position: relative;">
                                                <a class="add-place"><i></i></a>
                                                <div id="html5_1diu8bmn39fh184b1qv7178jj4s3_container"
                                                     class="moxie-shim moxie-shim-html5"
                                                     style="position: absolute; top: 0px; left: 0px; width: 120px; height: 120px; overflow: hidden; z-index: -1;">
                                                    <input id="html5_1diu8bmn39fh184b1qv7178jj4s3" type="file"
                                                           style="font-size: 999px; opacity: 0; position: absolute; top: 0px; left: 0px; width: 100%; height: 100%;"
                                                           multiple="" accept="image/jpeg,image/gif,image/png,.JPEG">
                                                </div>
                                            </dd>
                                        </dl>
                                        <p style="clear:both;">图片不超过20张</p>
                                    </div>
                                </div>
                                <div class="review-item item-action">
                                    <a class="btn-large _j_submit" role="button" title="提交" id="btn_save">提交</a>
                                </div>
                            </form>
                        </div>
                    </div>


                </div>
            </div>
            <a id="popup_close" class="close-btn _j_close"><i></i></a></div>
    </div>
</div>


<script type="text/javascript">

    $(function () {
        $("._j_starlist a").mouseover(function () {
            var index = $(this).index() + 1;
            var text = $(this).attr("title");
            $(this).closest("div").prev().addClass("star" + index);
            $(this).closest("div").parent().next().html(text);
        }).mouseout(function () {
            var index = $(this).index() + 1;
            var text = $(this).attr("title");
            $(this).closest("div").prev().removeClass("star" + index);
            $(this).closest("div").parent().next().html(text);

            var x = $(this).closest("div").prev().prev().val();
            if (x == index) {
                $(this).closest("div").prev().addClass("star" + x);
            }


        }).click(function () {
            var index = $(this).index() + 1;
            var text = $(this).attr("title");
            $(this).closest("div").prev().addClass("star" + index);
            $(this).closest("div").parent().next().html(text);

            $(this).closest("div").prev().prev().val(index);

        })
    })

</script>

    <#include "../common/footer.ftl">
</html>